package com.aifast.dict.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @Author AiFast
 * @since 2022/12/27 16:51
 */
@ConfigurationProperties(
        prefix = "ai.dict"
)
public class FastDictProperties {


    /**
     * 字典转译开关 默认开启
     */
    private boolean enable = true;

    private String mode = "caffeine";

    private DictSourceProperties source;

    private CaffeineSetProperties caffeine = new CaffeineSetProperties();

    private EhCacheSetProperties ehcache = new EhCacheSetProperties();

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    public String getMode() {
        return mode;
    }

    public void setMode(String mode) {
        this.mode = mode;
    }

    public DictSourceProperties getSource() {
        return source;
    }

    public void setSource(DictSourceProperties source) {
        this.source = source;
    }

    public CaffeineSetProperties getCaffeine() {
        return caffeine;
    }

    public void setCaffeine(CaffeineSetProperties caffeine) {
        this.caffeine = caffeine;
    }

    public EhCacheSetProperties getEhcache() {
        return ehcache;
    }

    public void setEhcache(EhCacheSetProperties ehcache) {
        this.ehcache = ehcache;
    }

    @Override
    public String toString() {
        return "FastDictProperties{" +
                "enable=" + enable +
                ", mode='" + mode + '\'' +
                ", source=" + source +
                ", caffeine=" + caffeine +
                ", ehcache=" + ehcache +
                '}';
    }
}
